﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BTServer
{
    public partial class NewPatient : Form
    {
        private String firstName;
        private String lastName;
        private String personalId;
        private String medicalId;
        private DateTime dateBirth;
        public NewPatient()
        {
            InitializeComponent();
        }

        public String FirstName
        {
            get
            {
                return firstName;
            }

            set
            {
                firstName = value;
            }
        }

        public String LastName
        {
            get
            {
                return lastName;
            }

            set
            {
                lastName = value;
            }
        }

        public String PersonalId
        {
            get
            {
                return personalId;
            }

            set
            {
                personalId = value;
            }
        }

        public String MedicalId
        {
            get
            {
                return medicalId;
            }

            set
            {
                medicalId = value;
            }
        }

        public DateTime birthDate
        {
            get
            {
                return dateBirth;
            }

            set
            {
                dateBirth = value;
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (txtFirstName.Text != "" && txtLastName.Text != "" && txtMedicalId.Text != "" && txtPersonalId.Text != "")
            {
                firstName = txtFirstName.Text;
                lastName = txtLastName.Text;
                personalId = txtPersonalId.Text;
                dateBirth = birthDatePicker.Value;
                medicalId = txtMedicalId.Text;
            }
            else
            {
                MessageBox.Show("Greska", "Popunite sva polja", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
    }
}
